<?php

$dbConn = odbc_connect('EventDB','MyUser','Temp123');

if (!$dbConn)
	{exit("Connection Failed: " . $dbConn);}
	
$sql = "SELECT VenueID, V_Address, V_Location, Price, SeatCapacity FROM VENUE;";

$rs = odbc_exec($dbConn,$sql);

if (!$rs)
	{exit("Error in SQL");}
	
echo "<table cellpadding=15 border=2><tr>";
echo "<th>VenueID</th>";
echo "<th>Address</th>";
echo "<th>Location</th>";
echo "<th>Price</th>";
echo "<th>Seats</th>";
//echo "<th>Cal_ID</th></tr>";

 while(odbc_fetch_row($rs))
 {
  $id  = odbc_result($rs,"id"); 
        $VenueID  = odbc_result($rs,"VenueID"); 
        $V_Address  = odbc_result($rs,"V_Address"); 
        $V_Location = odbc_result($rs, "V_Location");
        $Price = odbc_result($rs, "Price");
        $SeatCapacity = odbc_result($rs, "SeatCapacity");
       // $Cal_ID = odbc_result($rs, "Cal_ID");
        
  echo "\t" . "<tr>\n";
  echo "\t\t" . "<td>" . $VenueID . "</td><td width=100>" . $V_Address . "</td><td>" . $V_Location . "</td><td width=100>" . $Price . "</td><td>" . $SeatCapacity . "</td><td>" ;
  echo "\t" . "</tr>\n";
  }

odbc_free_result($rs);

odbc_field_name($rs, 1);

odbc_close($dbConn);

echo "</table>";

?>